Skip to content

Add review skill to core plugin#11

Merged
factory-nizar merged 4 commits intomasterfrom
feat/code-review-skill
Mar 24, 2026
Merged

Add review skill to core plugin#11
factory-nizar merged 4 commits intomasterfrom
feat/code-review-skill

Conversation

@factory-nizar
Copy link
Contributor

@factory-nizar factory-nizar commented Mar 23, 2026

Summary

Adds a review skill to the core plugin at plugins/core/skills/review/SKILL.md. This is the canonical source of truth for the review methodology, used by both the CLI /review command and the CI action.

What the Skill Contains

Shared Methodology (between <!-- BEGIN/END_SHARED_METHODOLOGY --> markers)

  • Bug patterns: null/undefined safety, resource leaks, injection, OAuth/CSRF, concurrency, error handling, type-assumption bugs, async/await pitfalls, etc.
  • Systematic analysis patterns: logic & variable usage, null safety, type compatibility, async/await, security, concurrency, API contract & breaking changes
  • Analysis discipline: verify before flagging, trace data flow, check for intentional patterns
  • Reporting gate: what to report vs. what to skip, confidence calibration
  • Priority levels: P0-P3 with clear definitions
  • Finding format: structured output with suggestions
  • Deduplication rules

Two-Pass Review Pipeline

  • Pass 1 (Candidate Generation): understand PR intent, triage and group files, spawn parallel subagent reviewers, aggregate results
  • Pass 2 (Validation): re-examine each candidate against the diff, apply confidence-based filtering (P0 approve if trigger checks out, P1 verify, P2 reject by default), strict deduplication

README

  • Added core plugin section documenting the review skill

@factory-nizar factory-nizar force-pushed the feat/code-review-skill branch from 275dbf1 to 695c6d6 Compare March 23, 2026 22:05
Adds a review skill that can be invoked by humans in TUI sessions
and by models programmatically. Provides a structured review methodology
with bug patterns, analysis discipline, and reporting gates.

Shared methodology is marked with BEGIN/END_SHARED_METHODOLOGY so the
CI action can extract just the methodology for deep review prompts.

TUI path returns findings locally; CI path posts PR comments.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
README.md Outdated
**Skills:**

- `review` - Review code changes and identify high-confidence, actionable bugs. Includes systematic analysis patterns for null safety, async/await, security, concurrency, API contracts, and more. Used by both the CLI `/review` command and the CI action.
- `session-navigation` - Search and navigate past Droid sessions
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

noticed these were missing, not sure if we should add or we omitted intentionally

2. **Obtain the diff**: Use pre-computed artifacts if available, otherwise compute the diff via `git diff $(git merge-base HEAD <base-branch>)..HEAD`.
3. **Review all changed files**: Do not skip any file. Work through the diff methodically.

<!-- BEGIN_SHARED_METHODOLOGY -->
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

alternatively could also split the files, i think this might evolve as I determine how different the prompts are for deep vs shallow but currently the only difference is posting comments.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Single file seems reasonable until we get a sense of cost dynamics

@factory-nizar factory-nizar marked this pull request as ready for review March 23, 2026 22:55
factory-nizar and others added 2 commits March 23, 2026 16:07
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
Include candidate generation (file grouping, parallel subagents, aggregation)
and validation (confidence-based filtering, strict deduplication) in SKILL.md.
This makes the skill the single source of truth for the review process,
used by both the CLI /review command and the CI action.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
@factory-nizar factory-nizar changed the title Add code-review skill to core plugin Add review skill to core plugin Mar 23, 2026
Copy link
Contributor

@jonathan-factory jonathan-factory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, @factory-arman heads up that we're moving the review prompt from the droid-action repo to a core plugin skill

Will allow us to reuse the same review logic in /review, the droid-action CI job and in interactive mode when the user prompts for a review

2. **Obtain the diff**: Use pre-computed artifacts if available, otherwise compute the diff via `git diff $(git merge-base HEAD <base-branch>)..HEAD`.
3. **Review all changed files**: Do not skip any file. Work through the diff methodically.

<!-- BEGIN_SHARED_METHODOLOGY -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Single file seems reasonable until we get a sense of cost dynamics

@factory-nizar factory-nizar merged commit da37c7c into master Mar 24, 2026
@factory-nizar factory-nizar deleted the feat/code-review-skill branch March 24, 2026 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants